#include<iostream>
#include<vector>
#include<string>
using namespace std;


class Solution {
public:
    bool isSubsequence(string s, string t) {
        int posS = 0;
        int lens = s.size();
        int posT = 0;
        int lent = t.size();
        while (posS < lens && posT < lent) {
            if (s[posS] == t[posT]) {
                posS++;
                posT++;
            }
            else posT++;
        }
        if (posS == lens) return true;
        return false;
    }
};